﻿using Factory.MasterData.MeasureUnits.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace Factory.MasterData.MeasureUnits
{
    /// <summary>
    /// 计量单位接口
    /// </summary>
    public interface IMeasureUnitAppService : IApplicationService
    {
        /// <summary>
        /// 获取计量单位列表（分页）
        /// </summary>
        /// <param name="pagrIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="isNo"></param>
        /// <returns></returns>
       Task<PagedResult> GetListAsync(int pagrIndex, int pageSize, string? unitCode, string? unitName);

        /// <summary>
        /// 添加计量单位
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> CreateAsync(MeasureUnit measureunit);

        /// <summary>
        /// 修改计量单位
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>

        Task<int>  UpdateAsync(MeasureUnitUpdateDto measureunitupdateDto);

        /// <summary>
        /// 删除计量单位
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> DeleteAsync(int id);


        /// <summary>
        /// 获取主单位
        /// </summary>
        /// <returns></returns>
        Task<List<PrimaryUnitDto>> GetPrimaryUnit();

        /// <summary>
        /// 获取反填的数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<MeasureUnit> GetMeasureUnitOne(int id);
        /// <summary>
        /// 查询计量单位,绑定下拉框
        /// </summary>
        /// <returns>返回结果</returns>
        Task<List<MeasureUnitDto>> GetMeasureUnitDto();
    }
}
